package com.budwk.app.sqfw.models;

import cn.hutool.core.util.IdUtil;
import com.budwk.app.sqfwV2.dto.RallyPdfSaveDTO;
import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.util.Date;

/**
 * @program: wk-mini-dev-env
 * @description: 社区活动表
 * @author: LJT
 * @create: 2023-11-14 08:54
 **/
@Data
@Table("public.sqfw_rally")
@Comment("社区活动表")
@ApiModel(description = "社区活动表")
public class Sqfw_rally {
    private static final long serialVersionUID = 1L;

    @Column("id")
    @Name
    @Comment("编号")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    @Prev(els=@EL("$me.nextId()"))
    private String id;

    /**
     * 活动标题
     */
    @Column("rally_name")
    @Comment("活动标题")
    @ApiModelProperty(description = "活动标题")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String rallyName;

    /**
     * 活动内容
     */
    @Column("rally_content")
    @Comment("活动内容")
    @ApiModelProperty(description = "活动内容")
    @ColDefine(type = ColType.TEXT)
    private String rallyContent;

    /**
     * 活动开始时间
     */
    @Column("rally_start_time")
    @Comment("活动开始报名时间时间")
    @ApiModelProperty(description = "活动开始时间")
    @ColDefine(type = ColType.VARCHAR, width = 29)
    private Date rallyStartTime;

    /**
     * 活动结束时间
     */
    @Column("rally_end_time")
    @Comment("活动报名结束时间")
    @ApiModelProperty(description = "活动结束时间")
    @ColDefine(type = ColType.VARCHAR, width = 29)
    private Date rallyEndTime;

    /**
     * 发布人姓名
     */
    @Column("rally_release_user_name")
    @Comment("发布人姓名")
    @ApiModelProperty(description = "发布人姓名")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String rallyReleaseUserName;

    /**
     * 发布人id
     */
    @Column("rally_release_user_id")
    @Comment("发布人id")
    @ApiModelProperty(description = "发布人id")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String rallyReleaseUserId;

    /**
     * 发布人单位
     */
    @Column("rally_release_dept")
    @Comment("发布人单位")
    @ApiModelProperty(description = "发布人单位")
    @ColDefine(type = ColType.VARCHAR)
    private String rallyReleaseDept;

    /**
     * 覆盖年龄
     */
    @Column("rally_include_age")
    @Comment("覆盖年龄")
    @ApiModelProperty(description = "覆盖年龄")
    @ColDefine(type = ColType.VARCHAR, width = 10)
    private String rallyIncludeAge;

    /**
     * 覆盖性别
     */
    @Column("rally_include_sex")
    @Comment("覆盖性别")
    @ApiModelProperty(description = "覆盖年龄")
    @ColDefine(type = ColType.VARCHAR, width = 10)
    private String rallyIncludeSex;

    /**
     * 覆盖范围（特殊人员）
     */
    @Column("rally_include_range")
    @Comment("覆盖范围（特殊人员）")
    @ApiModelProperty(description = "覆盖范围（特殊人员）")
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String rallyIncludeRange;

    /**
     * 覆盖范围
     */
    @Column("rally_include_area")
    @Comment("覆盖范围")
    @ApiModelProperty(description = "覆盖范围")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String rallyIncludeArea;

    /**
     * 参与人员手机号
     */
    @Column("rally_join_user")
    @Comment("参与人员手机号")
    @ApiModelProperty(description = "参与人员手机号")
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String rallyJoinUser;

    /**
     * 活动类型1:报名，2文章发布
     */
    @Column("rally_type")
    @Comment("活动类型1:报名，2文章发布")
    @ApiModelProperty(description = "活动类型1:报名，2文章发布")
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private Integer rallyType;

    /**
     * 创建时间
     */
    @Column("create_time")
    @Comment("创建时间")
    @ApiModelProperty(description = "创建时间")
    @ColDefine(type = ColType.VARCHAR, width = 29)
    private Date createTime;

    /**
     * 报名条件
     */
    @Column("conditions")
    @Comment("报名条件")
    @ApiModelProperty(description = "报名条件")
    @ColDefine(type = ColType.VARCHAR, width = 29)
    private String conditions;

    /**
     * 完结标识
     */
    @Column("finish_status")
    @Comment("完结标识")
    @ApiModelProperty(description = "完结标识")
    @ColDefine(type = ColType.VARCHAR, width = 29)
    private String finishStatus;

    /**
     * 省
     */
    @Column("province")
    @Comment("省")
    @ApiModelProperty(description = "省")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String province;

    /**
     * 市
     */
    @Column("city")
    @Comment("市")
    @ApiModelProperty(description = "市")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String city;

    /**
     * 区
     */
    @Column("district")
    @Comment("区")
    @ApiModelProperty(description = "区")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String district;

    /**
     * 街道
     */
    @Column("county")
    @Comment("街道")
    @ApiModelProperty(description = "街道")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String county;

    /**
     * 社区
     */
    @Column("community")
    @Comment("社区")
    @ApiModelProperty(description = "社区")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String community;

    @Column("peo_limit")
    @Comment("人数限制")
    @ApiModelProperty(description = "人数限制")
    private String  peoLimit;

    @Column("full_range")
    private int fullRange;

    @Column("rally_content_json")
    @ColDefine(type = ColType.TEXT)
    private String rallyContentJson;

    @Comment("活动开始时间")
    @Column("eventRegistrationTime")
    private Date eventRegistrationTime;

    @Comment("草稿箱1草稿,2 发布")
    @Column("draft")
    private String draft;

    /**
     * 活动任务id
     */
    private String serviceId;

    private String remarks;
    private int pageNo;
    private int pageSize;
    private String orderBy;
    private String sort;
    private String query;
    private String activityType;
    private String typeOfService;
    public String nextId() {
        return IdUtil.getSnowflake(1, 1).nextIdStr();

    }
}
